<%@ page contentType="text/html; utf-8"%>
<%@ page pageEncoding="utf-8"%>
<%@ taglib prefix="t" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="s" uri="http://shiro.apache.org/tags" %>

<html>
<body>
<h2>系统首页 </h2>
<ul>
    <li><img src="<%=request.getContextPath()%>/static/images/1.jpg"></li>

    <s:hasRole name="管理员">
        <a href="<%=request.getContextPath()%>/i18n/change"><t:message code="language"/></a>
    </s:hasRole>

    <li><a href="<%=request.getContextPath()%>/students/addPage"><t:message code="stu.add"/></a></li>
    <li><a href="<%=request.getContextPath()%>/students/updatePage?sid=6" ><t:message code="stu.upate"/></a></li>
    <li><a href="<%=request.getContextPath()%>/uploadPage"><t:message code="upload"/></a></li>

    <h1>用于演示权限标签, 只显示有权限的功能</h1>
    <s:hasPermission name="bookmanager:book:add">
        <li><a href="#">书本查询</a></li>
    </s:hasPermission>
    <s:hasPermission name="bookmanager:book:add">
        <li><a href="#">书本新增</a></li>
    </s:hasPermission>
    <s:hasPermission name="bookmanager:book:edit">
        <li><a href="#">书本修改</a></li>
    </s:hasPermission>
    <s:hasPermission name="bookmanager:book:del">
        <li><a href="#">书本删除</a></li>
    </s:hasPermission>

    <h1>用于演示权限注解</h1>
    <li><a href="<%=request.getContextPath()%>/bookmanager/book/query">查询书本</a></li>
    <li><a href="<%=request.getContextPath()%>/bookmanager/book/add">增加书本</a></li>
    <li><a href="<%=request.getContextPath()%>/bookmanager/book/edit">修改书本</a></li>
    <li><a href="<%=request.getContextPath()%>/bookmanager/book/del">删除书本</a></li>

</ul>
</body>
</html>